package com.re6g3y.game.Tile.Hexagonal;

import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.Sprite;
import com.badlogic.gdx.math.Vector2;
import com.re6g3y.game.core.GameCore;
import com.re6g3y.game.entity.TextureEntity;

public class HexagonalTile extends TextureEntity {
    private static Texture texture;
    static{
        texture=GameCore.getInstance().textureLoader.load("graphics/hexagonal/tile/hexagonal.png");
    }

    private long iterVal;
    public float property;
    final static float sclBase=2*1.007f/(texture.getHeight());
    /**
     *
     * @param position
     * @param iterVal
     * @param scl 内接圆半径
     */
    public HexagonalTile(Vector2 position,long iterVal,float scl){
        this.iterVal=iterVal;
        this.sprite=new Sprite(texture);
        sprite.setCenter(position.x,position.y);
        sprite.setScale(sclBase*scl);
    }

    public HexagonalTile(float positionX,float positionY,long iterVal,float scl){
        this.iterVal=iterVal;
        this.sprite=new Sprite(texture);
        sprite.setCenter(positionX,positionY);
        sprite.setScale(sclBase*scl);
    }

    public Sprite getSprite(){
        return sprite;
    }

    public long getIterVal() {
        return iterVal;
    }
}
